package com.ibeeking.found.common.config.feign;

import com.ibeeking.found.common.config.feign.fallback.TenantDataPushFallbackFactory;
import com.ibeeking.found.common.entity.TenantDataPushParam;
import com.ibeeking.nematos.utils.result.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author ibeeking
 */
@FeignClient(name = "gmc-global-g-server", contextId = "tenantDataPushClient", path = "/g", fallbackFactory = TenantDataPushFallbackFactory.class, decode404 = true)
public interface TenantDataPushClient {

    /**
     * 租户数据分发
     *
     * @param param
     * @return
     */
    @PostMapping(value = "/dataPush/feign/v1/pushScript")
    ResponseResult<Boolean> pushScript(@RequestBody TenantDataPushParam param);
}
